<?php
/**
 * Created by PhpStorm.
 * User: liuxiaojie
 * Date: 2019-06-18
 * Time: 16:09
 */

namespace app\mall\controller;

use app\common\BaseLoginCompany;
use app\mall\service\AdminService;
use think\Request;

class Comadmin extends BaseLoginCompany
{
    private $adminService;
    function __construct(Request $request = null, AdminService $adminService)
    {
        parent::__construct($request);
        $this->adminService = $adminService;
    }

    function addAdmin()
    {
        $param = [
            'company_id' => $this->getParam('u_id', 0),
            'customer_id'=> $this->getParam('customer_id', 0)
        ];
        $this->adminService->addAdmin($param);
        return success([]);
    }

    function deleteAdmin()
    {
        $param = [
            'company_id' => $this->getParam('u_id', 0),
            'customer_id'=> $this->getParam('customer_id', 0)
        ];

        $this->adminService->deleteAdmin($param);
        return success([]);
    }


}